package com.findMoneyGame.pages.shop {
	
	public class ImprovementsConfig {

		private static var _timeBonuses : Array = [15, 17, 20, 25];
		private static var _loupeBonuses : Array = [1.5, 1.7, 2];
		private static var _hintBonuses : Array = [80, 60, 40];
		private static var _timeBonusesPrices : Array = [200, 500, 800, 1500];
		private static var _loupeBonusesPrices : Array = [200, 500, 800];
		private static var _hintBonusesPrices : Array = [500, 800, 2000];


		public static function get noTimeBonus () { return 10; }
		public static function get timeBonuses () { return _timeBonuses; }
		public static function get timeBonusesPrices () { return _timeBonusesPrices; }

		public static function get noLoupeBonus () { return 1.2; }
		public static function get loupeBonuses () { return _loupeBonuses; }
		public static function get loupeBonusesPrices () { return _loupeBonusesPrices; }
		
		public static function get noHintBonus () { return 100; }
		public static function get hintBonuses () { return _hintBonuses; }
		public static function get hintBonusesPrices () { return _hintBonusesPrices; }

		public static function getTimeBonus (index : int) { return getElement(index, timeBonuses, noTimeBonus); }
		public static function getHintRadius (index : int) { return getElement(index, hintBonuses, noHintBonus); }
		public static function getLoupeScale (index : int) { return getElement(index, loupeBonuses, noLoupeBonus); }
		private static function getElement (index : int, array : Array, defValue : Number) {
			if (index < 0) {
				return defValue;
			} else if (index < array.length) {
				return array[index];
			} else {
				return array[array.length - 1];
			}
		}
	}
}